﻿!function ($) {
    function setDockElement() {
        var $dockEle = $("*[data-dock='true']"),
            coverHeight = 0,
            containerHeight = $dockEle.parent().outerHeight(true);
        $dockEle.siblings("*:visible").each(function () {
            coverHeight += $(this).outerHeight(true);
        });
        var spaceHeight = containerHeight - coverHeight - 10;
        $dockEle.css("min-height", spaceHeight);
    }
    setDockElement();
    
}(jQuery);